package com.ruoyi.odorservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.odorservice.entity.Craft;
import com.ruoyi.odorservice.model.vo.CraftOdorMaterialVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CraftMapper extends BaseMapper<Craft> {
    List<CraftOdorMaterialVo> selectCraftByIndustryId(Integer id);

    List<Craft> selectCraftPage(@Param("offset") Integer offset, @Param("limit") Integer limit, @Param("craftName") String craftName, @Param("industryId")Integer industryId);

    Integer selectCraftPageCount(@Param("craftName") String craftName, @Param("industryId") Integer industryId);

    void insertIndustryCraft(@Param("craftId") Integer craftId, @Param("industryId") Integer industryId);

    Integer selectSameCraftName(@Param("craftName") String craftName, @Param("industryId") Integer industryId);
}
